package dom.domain;

import java.util.ArrayList;

/**
 * Examplace entity. @author MyEclipse Persistence Tools
 */

public class Examplace implements java.io.Serializable {

	// Fields
	private Integer epId;
	private String epname;
	private String epAddress;
	private Integer epClassNo;
	private Integer limitNo;
	private Integer provinceId;
	private Integer allocatedNo;
	// Constructors

	/** default constructor */
	public Examplace() {
	}
	public void setInfo(String Info,String EPInfo)
	{
		String[] title = Info.split("#");
		String[] addInfo = EPInfo.split("#");
		for(int i=0;i<title.length;i++)
		{
			if(title[i].equals("epId"))
			{
				this.setEpId(Integer.parseInt(addInfo[i]));
			}
			if(title[i].equals("epname"))
			{
				this.setEpname(addInfo[i]);
			}
			if(title[i].equals("epAddress"))
			{
				this.setEpAddress(addInfo[i]);
			}
			if(title[i].equals("epClassNo"))
			{
				this.setEpClassNo(Integer.parseInt(addInfo[i]));
			}
			if(title[i].equals("limitNo"))
			{
				this.setLimitNo(Integer.parseInt(addInfo[i]));
			}
			if(title[i].equals("provinceNo"))
			{
				this.setProvinceNo(Integer.parseInt(addInfo[i]));
			}
			if(title[i].equals("allocatedNo"))
			{
				this.setAllocatedNo(Integer.parseInt(addInfo[i]));
			}
		}
	}
	private void setProvinceNo(int parseInt) {
		// TODO Auto-generated method stub
		
	}
	public ArrayList<String> getInfo(String Info)
	{
		String[] title = Info.split("#");
		ArrayList<String> list = new ArrayList<String>();
		for(int i=0;i<title.length;i++)
		{
			if(title[i].equals("epId"))
			{
				list.add(Integer.toString(this.getEpId()));
			}
			if(title[i].equals("epname"))
			{
				list.add(this.getEpname());
			}
			if(title[i].equals("epAddress"))
			{
				list.add(this.getEpAddress());
			}
			if(title[i].equals("epClassNo"))
			{
				list.add(Integer.toString(this.getEpClassNo()));
			}
			if(title[i].equals("limitNo"))
			{
				list.add(Integer.toString(this.getLimitNo()));
			}
			if(title[i].equals("provinceId"))
			{
				list.add(Integer.toString(this.getProvinceId()));
			}
			if(title[i].equals("allocatedNo"))
			{
				list.add(Integer.toString(this.getAllocatedNo()));
			}
		}
		return list;
	}
	/** full constructor */
	public Examplace(Integer epId, String epname, String epAddress,
			Integer epClassNo, Integer limitNo, Integer provinceId,
			Integer allocatedNo) {
		this.epId = epId;
		this.epname = epname;
		this.epAddress = epAddress;
		this.epClassNo = epClassNo;
		this.limitNo = limitNo;
		this.provinceId = provinceId;
		this.allocatedNo = allocatedNo;
	}

	// Property accessors

	public Integer getEpId() {
		return this.epId;
	}

	public void setEpId(Integer epId) {
		this.epId = epId;
	}

	public String getEpname() {
		return this.epname;
	}

	public void setEpname(String epname) {
		this.epname = epname;
	}

	public String getEpAddress() {
		return this.epAddress;
	}

	public void setEpAddress(String epAddress) {
		this.epAddress = epAddress;
	}

	public Integer getEpClassNo() {
		return this.epClassNo;
	}

	public void setEpClassNo(Integer epClassNo) {
		this.epClassNo = epClassNo;
	}

	public Integer getLimitNo() {
		return this.limitNo;
	}

	public void setLimitNo(Integer limitNo) {
		this.limitNo = limitNo;
	}

	public Integer getProvinceId() {
		return this.provinceId;
	}

	public void setProvinceId(Integer provinceId) {
		this.provinceId = provinceId;
	}

	public Integer getAllocatedNo() {
		return this.allocatedNo;
	}

	public void setAllocatedNo(Integer allocatedNo) {
		this.allocatedNo = allocatedNo;
	}
	
	
	@Override
	public String toString() {
		return "{epId:'" + epId + "', epname:'" + epname + "', epAddress:'"
				+ epAddress + "', epClassNo:'" + epClassNo + "', limitNo:'"
				+ limitNo + "', provinceId:'" + provinceId + "', allocatedNo:'"
				+ allocatedNo + "'}";
	}
	

}